import request from '@/utils/request'


export default{
    codeList(page, size, searchMap) {
        return request({
            url: `manage/ticket/ticket/index?page=${page}&size=${size}&keyword=${searchMap.keyword}&shop_id=${searchMap.shop_id}&type=${searchMap.type}&expire=${searchMap.expire}&status=${searchMap.status}`,
            method: 'get',
        })
    },
    // 核销码核销
    codeWrite(data) {
        return request({
            url: `manage/ticket/ticket/useTicket`,
            method: 'post',
            data:data
        })
    },
    // 核销码作废
    refundCode(id) {
        return request({
            url: `manage/ticket/ticket/cancelled?id=${id}`,
            method: 'post',
        })
    },
}
